home *** CD-ROM | disk | FTP | other *** search
/ The Trig Explorer / The Trig Explorer.iso / mac / Explorer / Ex_Right.dxr / 00049.ls < prev    next >
Encoding:
Text File  |  1998-07-22  |  1.1 KB  |  52 lines

  1. on mouseUp
  2.   global a, b, c
  3.   set a to field "A"
  4.   set b to field "B"
  5.   set c to field "C"
  6.   if field "A" = EMPTY then
  7.     set a to 0
  8.   end if
  9.   if field "B" = EMPTY then
  10.     set b to 0
  11.   end if
  12.   if field "C" = EMPTY then
  13.     set c to 0
  14.   end if
  15.   if (a > 200) or (a < -200) or (b > 200) or (b < -200) or (c > 300) then
  16.     go("Error")
  17.     return 
  18.   end if
  19.   if (abs(a) > 200) or (abs(b) > 200) or (abs(c) > 300) then
  20.     go("Error")
  21.     return 
  22.   else
  23.     if (a <> 0) and (b <> 0) and (c <> 0) then
  24.       go("Error")
  25.       return 
  26.     else
  27.       if (c < 0) or ((a = 0) and (b = 0)) or ((a = 0) and (c = 0)) or ((b = 0) and (c = 0)) then
  28.         put 1
  29.         go("Error")
  30.       else
  31.         if field "C" = EMPTY then
  32.           go("SC")
  33.         else
  34.           if (field "B" = EMPTY) and (abs(field "A") < field "C") then
  35.             go("SB")
  36.           else
  37.             if (field "A" = EMPTY) and (abs(field "B") < field "C") then
  38.               go("SA")
  39.             else
  40.               go("Error")
  41.             end if
  42.           end if
  43.         end if
  44.       end if
  45.     end if
  46.   end if
  47. end
  48.  
  49. on mouseDown
  50.   button()
  51. end
  52.